package com.xiaoshuidi.cloud.module.finance.convert.finance;

import com.xiaoshuidi.cloud.framework.common.pojo.PageResult;
import com.xiaoshuidi.cloud.module.contract.vo.CompanyInvoiceReqVO;
import com.xiaoshuidi.cloud.module.finance.controller.admin.invoice.vo.*;
import com.xiaoshuidi.cloud.module.finance.controller.app.invoice.vo.AppBaseInvoiceVO;
import com.xiaoshuidi.cloud.module.finance.controller.app.invoice.vo.AppFinanceInvoiceVO;
import com.xiaoshuidi.cloud.module.finance.dal.dataobject.invoice.*;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface InvoiceConvert {
    InvoiceConvert INSTANCE = Mappers.getMapper(InvoiceConvert.class);

    FinanceInvoiceConfigDO convert(FinanceInvoiceConfigCreateReqVO reqVO);

    FinanceInvoiceConfigDO convert(FinanceInvoiceConfigSwitchReqVO reqVO);

    List<FinanceInvoiceTaxRateDO> convertToList(List<FinanceInvoiceTaxRateVO> taxes);

    List<FinanceInvoiceTaxRateVO> convertToList2(List<FinanceInvoiceTaxRateDO> l);

    List<FinanceInvoiceConfigApartmentRespVO> convertToList3(List<FinanceInvoiceApartmentDO> l);

    List<FinanceInvoiceConfigSimpleVO> convertToList4(List<FinanceInvoiceConfigDO> list);

    FinanceInvoiceRecordRespVO convert(FinanceInvoiceRecordDO record);

    PageResult<FinanceInvoiceRecordVO> convertToPage(PageResult<FinanceInvoiceRecordDO> page);

    PageResult<FinanceInvoiceConfigVO> convertToPage2(PageResult<FinanceInvoiceConfigDO> page);

    FinanceInvoiceConfigVO convert(FinanceInvoiceConfigDO configDO);

    PageResult<AppFinanceInvoiceVO> convertToPage3(PageResult<FinanceInvoiceRecordDO> page);

    AppFinanceInvoiceVO convert2(FinanceInvoiceRecordDO financeInvoiceDO);

    AppBaseInvoiceVO convertByAppBaseInvoice(InvoiceDO invoiceDO);

    PageResult<AppBaseInvoiceVO> convertByAppBaseInvoicePage(PageResult<InvoiceDO> page);

    CompanyInvoiceReqVO convert(FinanceInvoiceCompanyApplyReqVO reqVO);
}
